package com.pig4cloud.pig.village.reward.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pig4cloud.pig.village.api.app.MainReward;
import com.pig4cloud.pig.village.api.dto.RewardInfoDTO;
import com.pig4cloud.pig.village.api.entity.RewardEvent;
import com.pig4cloud.pig.village.api.entity.RewardInfo;
import com.pig4cloud.pig.village.api.request.RewardAdd;
import com.pig4cloud.pig.village.api.request.RewardSearch;
import com.pig4cloud.pig.village.api.request.RewardUpdate;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author limbray.li
 * @date 2021/6/26
 */
public interface IRewardService extends IService<RewardInfo> {
	boolean addReward(RewardAdd rewardAdd);
	boolean updateReward(RewardUpdate rewardUpdate);
	IPage<RewardInfoDTO> pageBySearch(Page page, RewardSearch search);
	boolean accessReward(Long rewardId,String checkName);
	boolean updateRewardAmount(Long eventId, BigDecimal amountFamily, BigDecimal amountTeam);
	Integer countByYear(Integer year,Integer punishment);
	Integer countByMonth(Integer year,Integer month,Integer punishment);
	List<MainReward> mainRewardList(Integer year,Integer punishment);
	//由于可能会遇到数量统计或者金额统计，所以此处查询所有
	List<RewardInfo> listByCondition(Integer year,Integer punishment);
	List<RewardInfo> listByEvent(RewardEvent event);
}
